//
//  NavigationController.swift
//  SwiftHub
//
//  Created by Khoren Markosyan on 1/4/17.
//  Copyright © 2017 Khoren Markosyan. All rights reserved.
//

import UIKit
import RxSwift
import RxCocoa

class NavigationController: UINavigationController {

    override var preferredStatusBarStyle: UIStatusBarStyle {
        return globalStatusBarStyle.value
    }

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        interactivePopGestureRecognizer?.delegate = nil // Enable default iOS back swipe gesture

//        if #available(iOS 13.0, *) {
//            hero.isEnabled = false
//        } else {
//            hero.isEnabled = true
//        }
//        hero.modalAnimationType = .autoReverse(presenting: .fade)
//        hero.navigationAnimationType = .autoReverse(presenting: .slide(direction: .left))

        navigationBar.isTranslucent = false
//        navigationBar.backIndicatorImage = R.image.icon_navigation_back()
//        navigationBar.backIndicatorTransitionMaskImage = R.image.icon_navigation_back()
        navigationBar.theme.tintColor = themed { $0.secondary }
        navigationBar.theme.barTintColor = themed { $0.primaryDark }
        navigationBar.theme.titleTextAttributes = themed { [NSAttributedString.Key.foregroundColor: $0.secondary]}
        navigationBar.theme.backgroundColor = themed { $0.background }
    }
}
